﻿using System.Text;

using System.ComponentModel.DataAnnotations;


using System;
using System.Collections.Generic;
 
using System.Linq;
using Wedo.Mvc.Utility;
using Wedo.Domain.Models;
using System.ComponentModel;

namespace Wedo.Recognition.Domain.Models
{
    /// <summary>
    /// 退款申请信息
    /// </summary>
    [System.ComponentModel.DisplayName("退款申请信息")]
    public class RefundmentApply : Entity
    {

        public BankData BankData { get; set; }

        /// <summary>
        /// 账单数据编号
        /// </summary>
        public Guid BankDataId { set; get; }
 
        /// <summary>
        /// 客户名称
        /// </summary>
        //[DataColumn(10, 120)]
        [DisplayName("CustomerName")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        public string CustomerName { set; get; }

        /// <summary>
        /// 客户编号
        /// </summary>
        ////[DataColumn(10, 120)]
        [DisplayName( "客户编号")]
        public string CustomerCode { set; get; }

        /// <summary>
        /// 订单编号
        /// </summary>
        //[DataColumn(20, 80)]
        [DisplayName("OrderNum")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        public string OrderNum { set; get; }

        #region 退款信息
        /// <summary>
        /// 退款金额
        /// </summary>
        [DisplayName("Amount")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        //[DataColumn(30, 80)]
        public decimal Amount { set; get; }

        /// <summary>
        /// 申请人
        /// </summary>
        [DisplayName("ApplyMan")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        //[DataColumn(40, 60)]
        public string ApplyMan { set; get; }

        /// <summary>
        ///申请时间
        /// </summary>
        [DisplayName("ApplyTime")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        //[DataColumn(50, 60)]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public DateTime? ApplyTime { set; get; }

        /// <summary>
        /// 审批人
        /// </summary>
        [DisplayName("AgreedMan")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        ////[DataColumn(60, 60)]
        public string Approver { set; get; }

        /// <summary>
        ///  审批时间
        /// </summary>
        [DisplayName("AgreedTime")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        ////[DataColumn(70, 60)]
        [DisplayFormat(ApplyFormatInEditMode = true, DataFormatString = "{0:yyyy-MM-dd}")]
        public DateTime? ApprovalTime { set; get; }

        /// <summary>
        /// 状态 1 等待审批 2 同意退款 3 拒绝退款
        /// </summary>
        [DisplayName("Status")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        //[DataColumn(80, 60)]
        public int Status { set; get; }

        /// <summary>
        /// 退款原因
        /// </summary>
        [DisplayName("RefundmentReason")]//, ResourceType = typeof(Wedo.Recognition.Resources.RefundmentApply))]
        [Required(ErrorMessage = "{0} 不能为空！")]
        public string RefundmentReason { set; get; } 
        #endregion

        #region 收款信息

        /// <summary>
        /// 户主
        /// </summary>
        [DisplayName( "户主")]
        public string BankPerson { set; get; }
        /// <summary>
        /// 开户行所在省份
        /// </summary>
        [DisplayName( "开户行所在省份")]
        public string BankProvince { set; get; }
        /// <summary>
        /// 开户行所在城市
        /// </summary>
        [DisplayName( "开户行所在城市")]
        public string BankCity { set; get; }
        /// <summary>
        /// 开户行名称
        /// </summary>
        [DisplayName( "开户行名称")]
        public string BankName { set; get; }
        /// <summary>
        /// 开户行账号
        /// </summary>
        [DisplayName( "开户行账号")]
        public string BankAccount { set; get; }
        #endregion

        /// <summary>
        /// 签出记录
        /// </summary>
        public Guid CheckRecordID { get; set; }

    }

 }
